import FCollider, { ColliderType } from "./FCollider";

const { ccclass, property, menu } = cc._decorator;

@ccclass
@menu("碰撞组件Ex/FBoxCollider")
export default class FCircleCollider extends FCollider {

    public worldPosition = cc.v2();
    public worldRadius: number = 0;
    public get type() {
        return ColliderType.Circle;
    }

    @property
    public get radius(): number {
        return this._radius;
    }
    public set radius(value: number) {
        this._radius = value < 0 ? 0 : value;
    }
    @property
    private _radius: number = 40;
}
